/**************************************************************************************** Import */
import _ from 'lodash';
import React, {Component} from 'react';
import { TextInput, View, Dimensions } from 'react-native';
import { Icon,  List, Button, InputItem, Tabs, TextareaItem, DatePicker, Accordion } from 'antd-mobile-rn';
import { CAround, CBetween, CCenter, CColumn, CFloat, CHand, CItemX, CItemY, CLine, CLoad, CRow, CWrap, CBone, CIcon, CImage, CSvg, CText, CFull, CScroll, CFooter, CHeader, CPage, CButton, CLabel, PTabbar, PHeader } from '../../../../library/comp';
import { Dialog, Http, PageBase } from '../../../../library/func';
import Design from '../../../../design';
import Config from '../../../../config';

/**************************************************************************************** Pageload */

/**************************************************************************************** Cacheload */

/**************************************************************************************** Preload */

/**************************************************************************************** Get */

/**************************************************************************************** Post */

/**************************************************************************************** Page */
export default class UserSettingCarDetail extends PageBase {
    constructor(props) {
        super(props);
        this.state = {
            data:{
                set_number:"FVVV车牌号码"
            },
        };
    }

    /************************************************************************************ Life */
    /**
     * didMount
     */
    componentDidMount(){
        // http请求
        // HttpTemp.get({
        //     url:"/CPage/mycar/detail.php",
        //     data: {
        //         id: this.props.navigation.getParam('id')
        //     },
        //     success:(res) => {
        //         let data = res.data;
        //         this.setState({
        //             data:data,
        //         })
        //     }
        // })

    }

    /************************************************************************************ Func */
    deleteCar(){
        // HttpTemp.post({

        //     url:"/CPage/mycar/logic/delete.php",
        //     data:{
        //         id:this.state.data.id
        //     },
        //     success:(res) => {
        //         Dialog.text("删除成功", 1);
        //         //需要回跳
        //     },
        //     error: {
        //         code: (res)=> {
        //             Dialog.text(res.msg, 1);
        //         }
        //     }

        // })

    }

    /************************************************************************************ Render */
    render(){
        return(
            <CPage>

                <CScroll bg='rgba(248, 248, 248, 1)' mt='96'>

                    <CColumn>

                        {/* 车辆信息标题 */}
                        <CItemX w="750" mx="30" h="80" y="center"> 
                            <CText color="#AEAEAE" size="26">车辆信息</CText>
                        </CItemX>

                        {/* 车辆信息 */}
                        <CItemY  w="750" bg="white">

                            {/* 车牌号码详情 */}
                            <CItemX w="750" px="30" style={{ borderBottomWidth:1, borderBottomColor:"#eee" }}  h="100" y="center"> 
                                <CBetween>
                                    <CText size="30" color="#434343">车牌号码</CText>
                                    <CText size="30" color="#434343">{this.state.data.set_number}</CText>
                                </CBetween>
                            </CItemX>

                        </CItemY>

                        {/* 删除按钮，删除之前会询问用户是否确认删除 */}
                        <CColumn py='10' mt='60' px='30'>
                            <CButton {...Design.global.commonButton} onPress={e=>{
                                // Modal.alert('确定要删除吗', '删除后不可恢复', [
                                //     { text: '确定', onPress: () => {
                                //         this.deleteCar();
                                //     }, style:{ color:"#797979" }},
                                //     { text: '取消', onPress: () => {}, style:{ color:"#02B349" }},
                                // ]);
                            }}>删除</CButton>
                        </CColumn>

                    </CColumn>

                </CScroll>

                {/* header */}
				<PHeader nav={this.nav}>车辆详情</PHeader>

            </CPage>
        )
    }
}

